home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Sample Code / Snippets / Development Tools & Languages / AEGestalt / MAEGestalt.cp < prev    next >
Encoding:
Text File  |  1993-01-18  |  1.1 KB  |  51 lines  |  [TEXT/MPS ]

  1. //     MAEGestalt.cp
  2. //     Copyright © 1991-92 by Apple Computer, Inc. All rights reserved.
  3. //    Kent Sandvik DTS
  4. //    This is the main-main file, it all starts here...
  5. //
  6. //    <1>        khs        1.0        First final version
  7.  
  8.  
  9. // INCLUDES
  10.  
  11. #ifndef __AEGESTALT__
  12. #include "UAEGestalt.h"
  13. #endif
  14.  
  15.  
  16. // T H E   M A I N    P R O G R A M
  17.  
  18. #pragma processor 68000
  19. #pragma segment Main
  20.  
  21.  
  22. // the application object 
  23. TAEApplication* gAEApplication = NULL;
  24.  
  25. void main()
  26. {
  27.     // essential toolbox and utilities initialization
  28.     InitToolBox();
  29.  
  30.     // make sure we can run
  31.     if (ValidateConfiguration(gConfiguration) && gConfiguration.hasColorQD && gConfiguration.hasAppleEventMgr)
  32.     {
  33.         // we made it! Continue with remainder of initialization 
  34.         // initialize MacApp; 8 calls to MoreMasters        
  35.         InitUMacApp(8);
  36.         // initialize the TDialog view handling
  37.         InitUDialog();
  38.  
  39.         // construct a new TAEApplication object, allocation errors are checked for.
  40.         gAEApplication = new TAEApplication;
  41.         gAEApplication->IAEApplication(kFileType, kSignature);
  42.  
  43.         // run the application, when it's done - exit.
  44.         gAEApplication->Run();
  45.     }
  46.     else
  47.         StdAlert(phUnsupportedConfiguration);
  48. }
  49.  
  50.  
  51.